3.1574 \(\int \left (a+\frac{b}{x}\right )^3 \, dx\)

Optimal. Leaf size=33 \[ a^3 x+3 a^2 b \log (x)-\frac{3 a b^2}{x}-\frac{b^3}{2 x^2} \]

[Out]

-b^3/(2*x^2) - (3*a*b^2)/x + a^3*x + 3*a^2*b*Log[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0366301, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222 \[ a^3 x+3 a^2 b \log (x)-\frac{3 a b^2}{x}-\frac{b^3}{2 x^2} \]

Antiderivative was successfully verified.

[In]  Int[(a + b/x)^3,x]

[Out]

-b^3/(2*x^2) - (3*a*b^2)/x + a^3*x + 3*a^2*b*Log[x]

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ 3 a^{2} b \log{\left (x \right )} - \frac{3 a b^{2}}{x} - \frac{b^{3}}{2 x^{2}} + \int a^{3}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b/x)**3,x)

[Out]

3*a**2*b*log(x) - 3*a*b**2/x - b**3/(2*x**2) + Integral(a**3, x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00624543, size = 33, normalized size = 1. \[ a^3 x+3 a^2 b \log (x)-\frac{3 a b^2}{x}-\frac{b^3}{2 x^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b/x)^3,x]

[Out]

-b^3/(2*x^2) - (3*a*b^2)/x + a^3*x + 3*a^2*b*Log[x]

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 32, normalized size = 1. \[ -{\frac{{b}^{3}}{2\,{x}^{2}}}-3\,{\frac{a{b}^{2}}{x}}+{a}^{3}x+3\,{a}^{2}b\ln \left ( x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b/x)^3,x)

[Out]

-1/2*b^3/x^2-3*a*b^2/x+a^3*x+3*a^2*b*ln(x)

_______________________________________________________________________________________

Maxima [A]  time = 1.43691, size = 42, normalized size = 1.27 \[ a^{3} x + 3 \, a^{2} b \log \left (x\right ) - \frac{3 \, a b^{2}}{x} - \frac{b^{3}}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^3,x, algorithm="maxima")

[Out]

a^3*x + 3*a^2*b*log(x) - 3*a*b^2/x - 1/2*b^3/x^2

_______________________________________________________________________________________

Fricas [A]  time = 0.218149, size = 50, normalized size = 1.52 \[ \frac{2 \, a^{3} x^{3} + 6 \, a^{2} b x^{2} \log \left (x\right ) - 6 \, a b^{2} x - b^{3}}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^3,x, algorithm="fricas")

[Out]

1/2*(2*a^3*x^3 + 6*a^2*b*x^2*log(x) - 6*a*b^2*x - b^3)/x^2

_______________________________________________________________________________________

Sympy [A]  time = 1.29378, size = 31, normalized size = 0.94 \[ a^{3} x + 3 a^{2} b \log{\left (x \right )} - \frac{6 a b^{2} x + b^{3}}{2 x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b/x)**3,x)

[Out]

a**3*x + 3*a**2*b*log(x) - (6*a*b**2*x + b**3)/(2*x**2)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.219682, size = 42, normalized size = 1.27 \[ a^{3} x + 3 \, a^{2} b{\rm ln}\left ({\left | x \right |}\right ) - \frac{6 \, a b^{2} x + b^{3}}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^3,x, algorithm="giac")

[Out]

a^3*x + 3*a^2*b*ln(abs(x)) - 1/2*(6*a*b^2*x + b^3)/x^2